#ifndef _moje_sdl_h_
#define _moje_sdl_h_

#include <iostream>
#include <cstdlib>
#include "SDL.h"


class sdlapp{
	SDL_Surface * screen;
public:
	sdlapp(){
		if(SDL_Init(SDL_INIT_VIDEO)<0){
			std::cerr << "SDL init error: " << SDL_GetError() << std::endl;
			std::exit(1);
		}
		screen = SDL_SetVideoMode(800,600,32,SDL_ANYFORMAT);
		if(screen==NULL){
			std::cerr << "Video mode error: "<<SDL_GetError()<<std::endl;
			std::exit(1);
		}
		SDL_SetClipRect(screen,NULL);
	}
	~sdlapp(){
		SDL_Quit();
	}

};

#endif //_moje_sdl_h_

